<!--
  // Creation History
  // --------------------------------------------------------------
  //	Company:			HTHK
  //	NAME:				Job.jsp
  //	TITLE:				Local Cost
  //	FUNCTION:			Add or Update Job.
  //	BY:					Jet Tao
  //	DATE:				16/12/2003
  // --------------------------------------------------------------
-->

<%@ include file="../tssheader.jsp"   %>
<%@ page import="tss.restrict.*" %>
<%@ page import="tss.options.*" %>
<%@ page import="java.text.SimpleDateFormat" %>
<%@ page import="java.util.Date" %>

<script language="JavaScript" >

function formValidation()
{
	var d1=fm.restrict_bfquantity;
	var d2=fm.restrict_afquantity;
	if(isNull(d1," Before Weeks ")||isNull(d2," After Weeks "))
		return false;
	if (!isInt(d1)|| !isInt(d2))
	{
		alert(" Please input Integer! ");
		return false;
	}
    
	return true;
}

</script>


<%
    //Get A Restrict
   RestrictBean Restrict = (RestrictBean)request.getAttribute("Restrict");
    if (Restrict==null)
       Restrict = new Restrict();
    if (formAction!=null && formAction.trim().equalsIgnoreCase("Update"))
       readOnly = new String(" class=read readonly ");


%>
<body>

<h2>Restrict Maintenance</h2>
<form id=fm method=post action=<%=contextPath%>/servlet/tss.restrict.RestrictServlet >
<input type=hidden name=formAction value=<%=formAction%> >
<table cols=10 border=0 >
<tr>
  <td align=right>Before<input type=text name=restrict_bfquantity value="<%=Restrict.getBefore_quantity()%>" onBlur="this.value=this.value.toUpperCase();"  maxlength=4 size=5>Weeks</td>
</tr>
<tr>
 <td align=right>After<input type=text name=restrict_afquantity value="<%=Restrict.getAfter_quantity()%>" onBlur="this.value=this.value.toUpperCase();"  maxlength=4 size=5>Weeks</td>
</tr>
<input type=hidden name=restrict_unit value=<%=Restrict.getUnit()%> >

</table>
<hr>

<p>
  <INPUT type=button value=Save onclick="save()" >
   <INPUT type=reset  value=Cancel >
<!-- <INPUT type=button value=Back onclick="history.back()" >-->

</p>
</form>
<%@ include file="../tssfooter.jsp" %>
</body>
</body>
</html>

